package com.qy137.controller;

import com.qy137.entity.Member;
import com.qy137.service.MemberService;
import com.qy137.vo.CommonResult;
import com.qy137.vo.StudentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: qy137-java
 * @description: 会员管理
 * @author: 李冠
 * @create: 2021-10-19 16:57
 **/
@RestController
@RequestMapping("/student/member")
public class MemberController {
    @Autowired
    private MemberService memberService;



    @PostMapping("/getStudentAll/{page}/{limit}")
public CommonResult getStudentAll(
            @PathVariable("page")Integer page,
            @PathVariable("limit")Integer limit,
            @RequestBody StudentVo studentVo
            ){
        return memberService.getStudentAll(page,limit,studentVo);
    }

    @PostMapping("/modifyStudentInformation")
public CommonResult modifyStudentInformation(@RequestBody Member member){
       return memberService.modifyStudentInformation(member);
    }

    @PostMapping("/stateChange/{isDisabled}/{id}")
public CommonResult stateChange(@PathVariable("isDisabled") Boolean isDisabled,@PathVariable("id") String id){
    return memberService.stateChange(isDisabled,id);
    }



}
